package main;
import java.io.InputStream;
import java.io.OutputStream;

import tools.Help;
public final class ProgramLauncher {
	public static final void startServer(String lname) {
		try {
			String cmd = "java -classpath bin/:lib/jinput.jar:lib/lwjgl.jar:lib/lwjgl_util.jar:rohxel_alpha_0.2.jar -Djava.library.path=lib/ main.Start s -map " + lname;
			Runtime.getRuntime().exec(cmd);
			System.exit(0);
		} catch (Exception e) {
			Help.p(e.getStackTrace());
		}
	}
	public static final void startObjectEditor() {
		try {
			String cmd = "java -classpath bin/:lib/jinput.jar:lib/lwjgl.jar:lib/lwjgl_util.jar:rohxel_alpha_0.2.jar -Djava.library.path=lib/ editors.objectedit.ObjectEditor";
			Runtime.getRuntime().exec(cmd);
			System.exit(0);
		} catch (Exception e) {
			Help.p(e.getStackTrace());
		}
	}
	public static final void startWaypointEditor() {
		try {
			String cmd = "java -classpath bin/:lib/jinput.jar:lib/lwjgl.jar:lib/lwjgl_util.jar:rohxel_alpha_0.2.jar -Djava.library.path=lib/ editors.objectedit.WaypointEditorStart";
			Runtime.getRuntime().exec(cmd);
			System.exit(0);
		} catch (Exception e) {
			Help.p(e.getStackTrace());
		}
	}
}
